package cn.mymall.vo.product;

import cn.mymall.entity.mall.CartItem;
import cn.mymall.entity.mall.Product;
import cn.mymall.entity.mall.Sku;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ProductCartItemVo {
    private Integer productId;					//商品id
    private String productName;
    private String skuName;
    private String logo;
    private Integer cartItemId;
    private Integer skuId;						//skuid
    private Integer qty;						//购买数量
    private BigDecimal sellPrice;					//商品价格

    public ProductCartItemVo(){

    }
    public ProductCartItemVo(Product product, Sku sku, CartItem cartItem){
        this.productId = product.getId();
        this.productName = product.getName();
        this.skuName = sku.getName();
        this.logo = product.getLogo();
        this.cartItemId = cartItem.getId();
        this.skuId = sku.getId();
        this.qty = cartItem.getQty();
        this.sellPrice = cartItem.getSellPrice();
    }
}
